package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreRoleAddrPartsPK implements Serializable {
    public Long addressId;
    public Long addressPartId;
    public Long roleId;
    public Long roleVersionNum;

    public RimCoreRoleAddrPartsPK() {
    }

    public RimCoreRoleAddrPartsPK(Long addressId, Long addressPartId, 
                                  Long roleId, Long roleVersionNum) {
        this.addressId = addressId;
        this.addressPartId = addressPartId;
        this.roleId = roleId;
        this.roleVersionNum = roleVersionNum;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreRoleAddrPartsPK) {
            final RimCoreRoleAddrPartsPK otherRimCoreRoleAddrPartsPK = (RimCoreRoleAddrPartsPK) other;
            final boolean areEqual = 
                (otherRimCoreRoleAddrPartsPK.addressId.equals(addressId) && otherRimCoreRoleAddrPartsPK.addressPartId.equals(addressPartId) && otherRimCoreRoleAddrPartsPK.roleId.equals(roleId) && otherRimCoreRoleAddrPartsPK.roleVersionNum.equals(roleVersionNum));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
